<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>{$seo.title}</title>
{include file="common/style"}
</head>
<body>
{include file="common/header"}
<div class="banner-wp">
  <div class="layui-container">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md9">
      <!--首页推荐-->
	<div class="layui-card layui-card-body">
	<div class="layui-row layui-col-space20">
      <!--s-->
      	<div class="layui-col-md6">
      
			<div class="layui-carousel" id="test-carousel-img">
				<div carousel-item="">
					{volist name="adpic" id="item"}
					<div class="item">{if $item.url}<a href="{$item.url}" target="_blank"><img src="{$item.src}" width="100%" height="100%;"></a>{else}<img src="{$item.src}" width="100%" height="100%;">{/if}</div>
					{/volist}
				</div>
			</div>
			{volist name="hometop" id="item"}
			<div class="newbd">
				<div class="meta">
					<div class="ask-userinfo" style="margin-bottom: 1px;">
						<a href="{:url('wendasns/home/index',['id'=>$item.articles.user_id],false)}" class="portrait-xs" style="margin-right: 10px;">{:portrait($item.articles.user_id)}{$item.articles.users.username}</a> {if $item.articles.tags}{volist name=":load_tags($item.articles.tags)" id="tags" offset="0" length='1'}<a href="{:url('wendasns/topic/show',['tags'=>$tags.name])}" class="tag">{if $tags.icon}<img src="{$tags.icon}" alt="{$tags.name}">{/if}{$tags.name}</a> {/volist}{/if}
					</div>
				</div>
				<a target="_blank" class="plink" rel="noopener noreferrer" href="{:url('wendasns/article/show',$item.articles)}"><h2>{$item.articles.title}</h2></a>
				<div class="desc">{$item.articles.summary}</div>
				
			</div>
			{/volist}
       <div style="text-align: center; background: rgba(0,132,255,.1); padding: 5px; border-radius: 3px;margin-top: 5px;">
          <p><span class="layui-badge layui-bg-black">Wendasns</span> <span class="layui-badge-rim"><a href="https://www.wendasns.com/update.html">更新日志</a> <span class="layui-badge-dot layui-bg-green"></span></span></p>
          <a class="layui-btn layui-btn-lg layui-btn-primary layui-btn-radius" style="margin: 10px 0 10px;" href="https://www.wendasns.com/download.html"><i class="fas fa-cloud-download-alt
 fa-sm" style="color:#5FB878;" title="PHP问答社区系统"></i> 官方下载</a> {if miniapp() neq true}<a class="layui-btn layui-btn-lg layui-btn-danger layui-btn-radius" style="margin: 10px 0 10px;" href="https://gitee.com/xuemocms/wendasns" target="_blank"><span class="green">Gitee码云</span></a>{/if}
         <p>{if miniapp() neq true}<a target="_blank" href="https://jq.qq.com/?_wv=1027&amp;k=nLWnZ1Dn"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="wendasns技术交流群" title="wendasns技术交流群"></a>{else}{/if}</p>
        </div>
          
      </div>
      <!--e-->
      <!--s-->
      <div class="layui-col-md6">
		<fieldset class="layui-elem-field layui-field-title">
		<legend><i class="fas fa-book"></i> 推荐</legend>
		</fieldset>
		{volist name="homerecommend" id="item"}
		<div class="newsbd">
			<div class="info">
				<div class="meta">
					<div class="ask-userinfo" style="margin-bottom: 1px;">
						<a href="{:url('wendasns/home/index',['id'=>$item.articles.user_id],false)}" class="portrait-xs" style="margin-right: 10px;">{:portrait($item.articles.user_id)}{$item.articles.users.username}</a> {if $item.articles.tags}{volist name=":load_tags($item.articles.tags)" id="tags" offset="0" length='1'}<a href="{:url('wendasns/topic/show',['tags'=>$tags.name])}" class="tag">{if $tags.icon}<img src="{$tags.icon}" alt="{$tags.name}">{/if}{$tags.name}</a> {/volist}{/if}
					</div>
				</div>
				<a target="_blank" class="plink" rel="noopener noreferrer" href="{:url('wendasns/article/show',$item.articles)}"><h2>{$item.articles.title}</h2></a>
				<div class="metas">
					<span class="time" title="{:range_time($item.articles.create_time)}"><i class="layui-icon layui-icon-date"></i> {:range_time($item.articles.create_time)}</span>
					<span class="dot">·</span>
					<span class="readtime">阅读({$item.articles.visits})</span>
				</div>
			</div>
			<div class="bdthumb">
				<a href="{:url('wendasns/article/show',$item.articles)}" target="_blank" title="{$item.articles.title}">{:cover($item.articles)}</a>
			</div>
		</div>
		{/volist}
      </div>
      <!--e-->
      </div>
      </div>
      <!--首页推荐 end-->
      </div>
      <div class="layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-body" style="height: 187px;">
            <fieldset class="layui-elem-field layui-field-title">
		  <legend><i class="fas fa-volume-up"></i> 网站公告</legend>
			</fieldset>
            
            <ul>
          {volist name=":load_publish(5)" id="item"}
            <li><a href="{:url('wendasns/publish/show',['id'=>$item.id])}" style="{if $item.color}color: {$item.color};{/if}">{:substr_format($item.title)}</a><span style="float: right;">{$item.create_time|date='Y-m-d'}</span></li>
          {/volist}
        	</ul>
          </div>
        </div>
        
        <div class="layui-card layui-hide-xs">
        <div class="layui-card-body">
         <a href="{:url('wendasns/article/post')}" class="layui-btn layui-bg-blue layui-btn-fluid"><i class="fas fa-user-edit"></i> 撰写文章发布</a>
          </div>
        <div class="layui-card-body">
          <a href="{:url('wendasns/question/post')}" class="layui-btn layui-bg-red layui-btn-fluid"><i class="fas fa-edit"></i> 立即提问发布</a>
          </div>
		</div>
       <!--签到-->
	<div class="layui-card">
      
      <div class="layui-card-header"><button href="{:url('wendasns/sign/go')->domain(true)}" class="layui-btn layui-btn-xs layui-btn-danger J_req" data-click="sign">{if !$issign}<i class="fas fa-user-plus"></i> 今日签到{else}<i class="fas fa-user-plus"></i> 已签到{/if}</button><i class="wds-mid"></i><a href="{:url('wendasns/sign/charts')}" class="wds-link J_dialog" target="_blank" title="签到活跃榜 - TOP 20"><i class="fas fa-user-tag"></i> 活跃榜<span class="wds-badge-dot"></span></a> {if $loginUser.isLogin}<span class="wds-signin-days">连续<cite>{$loginUser.data.sign}</cite>天</span>{/if} </div>
      <div class="layui-card-body signs">
          <ul>
            {volist name="sign" id="item"}
            <li class="header-img">
            <a href="{:url('wendasns/home/index',['id'=>$item.user_id],false)}">
              <span class="header-process">
                <svg class="rc-progress-circle" viewBox="0 0 100 100">
                  <defs><linearGradient id="rc-progress-gradient-0" x1="100%" y1="0%" x2="0%" y2="0%"><stop offset="0%" stop-color="#33CC75"></stop><stop offset="100%" stop-color="#29CFB3"></stop></linearGradient></defs>
                  <path class="rc-progress-circle-trail" d="M 50,50 m 48.5,0
              a 48.5,48.5 0 1 1 -97,0
              a 48.5,48.5 0 1 1 97,0" stroke="#e8ecee" stroke-linecap="round" stroke-width="3" fill-opacity="0" style="stroke: rgb(232, 236, 238); stroke-dasharray: 304.734px, 304.734px; stroke-dashoffset: 0px; transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s ease 0s, stroke-width 0.06s ease 0.3s;"></path>
              <path class="rc-progress-circle-path" d="M 50,50 m 48.5,0
              a 48.5,48.5 0 1 1 -97,0
              a 48.5,48.5 0 1 1 97,0" stroke="url(#rc-progress-gradient-0)" stroke-linecap="round" stroke-width="3" fill-opacity="0" style="stroke-dasharray: 139.865px, 304.734px; stroke-dashoffset: 0px; transition: stroke-dashoffset 0s ease 0s, stroke-dasharray 0s ease 0s, stroke ease 0s, stroke-width ease 0.3s;"></path>
            </svg>
          </span>
            <div class="portrait-de">{:portrait($item.user_id)}</div>
          </a>
          </li>
          {/volist}
          </ul>
  
      </div>
    </div>
   <!--签到 end-->
        
      </div>
    </div>
  </div>
</div>
<div class="layui-container">
	<div class="layui-row layui-col-space15">
		{if miniapp() neq true}<div class="layui-col-md12">{:load_advert('IndexCentre')}</div>{/if}
	</div>
</div>
<div class="layui-container" style="margin-top: 5px;">
  <div class="layui-row layui-col-space15">
  
    <div class="layui-col-md9">

      <div class="layui-card">
        
        <div class="layui-card-list">
          <fieldset class="layui-elem-field layui-field-title">
  			<legend><i class="fas fa-question-circle"></i> 最新问题</legend>
			</fieldset>
          
        
          <div class="question-list">
                {volist name="question" id="item"}
				<section class="question-list-item">
                  <div class="qa-rank">
                    {if $item.answer==0}
					<div class="answers">
						{$item.answer}<small>未回</small>
					</div>
                    {/if}
                     {if $item.answer>0}
                    
                      {if $item.adopt_id>0}
                    <div class="answers answered solved">
						{$item.answer}<small>解决</small>
					</div>
                    {else}
                    <div class="answers answered">
						{$item.answer}<small>已回</small>
					</div>
                      {/if}
                    {/if}
                     
                    
								        <div class="views layui-hide-xs">
								            {$item.visits} <small>浏览</small>
								        </div>
								    </div>
                  <div class="summary">
                <a href="{:url('wendasns/question/show',$item)}" class="lista">{$item.title}</a>{if $item.tags}<div class="tags">{volist name=":load_tags($item.tags)" id="tags"} <a href="{:url('wendasns/topic/show',['tags'=>$tags.name])}" class="tag">{if $tags.icon}<img src="{$tags.icon}" alt="{$tags.name}">{/if}{$tags.name}</a>{/volist}</div>{/if}
                 
                <div class="ask-userinfo" style="margin-bottom: 1px;">
                <a href="{:url('wendasns/home/index',['id'=>$item.user_id],false)}" class="portrait-xs" style="margin-right: 10px;">{:portrait($item.user_id)}{$item.users.username}</a>  <span style="font-size: 14px;color: #777;float: right;"><i class="layui-icon layui-icon-date"></i>  {:range_time($item.create_time)}</span>
              </div>
                    </div>
                  </section>
                {/volist}
                {:hook('home_question_list_extra')}
          </div>
        </div>
      </div>
      
      {if miniapp() neq true}{:load_advert('IndexLeftCentre')}{/if}
      
      <div class="layui-card">
        
        <div class="layui-card-list">
          <fieldset class="layui-elem-field layui-field-title">
  			<legend><i class="fas fa-newspaper"></i> 最新文章</legend>
			</fieldset>
          <div id="article-list" class="article-list">
          {volist name="article" id="item"}
            <section class="article-list-item">
              <div class="thumb layui-hide-xs"><a href="{:url('wendasns/article/show',$item)}" target="_blank">{:cover($item)}</a></div>
              <div class="info">
                <div class="info-limit">
                  <h3><a href="{:url('wendasns/article/show',$item)}" class="lista">{$item.title}</a></h3>
                <p style="color: #777;">{:substr_format($item.summary, 80)}<p>
                </div>
                <div class="meta">
                      
                <div class="ask-userinfo" style="margin-bottom: 1px;">
                <a href="{:url('wendasns/home/index',['id'=>$item.user_id],false)}" class="portrait-xs" style="margin-right: 10px;">{:portrait($item.user_id)}{$item.users.username}</a> {if $item.tags}{volist name=":load_tags($item.tags)" id="tags"}<a href="{:url('wendasns/topic/show',['tags'=>$tags.name])}" class="tag">{if $tags.icon}<img src="{$tags.icon}" alt="{$tags.name}">{/if}{$tags.name}</a> {/volist}{/if}<span style="font-size: 14px;color: #777;float: right;"><i class="layui-icon layui-icon-date"></i>  {:range_time($item.create_time)}</span> 
              </div>
                  </div>
              </div>  
            </section>
          {/volist}
          {:hook('home_article_list_extra')}
            </div>
        </div>
      </div>
      
    </div>
    <!---->

    <div class="layui-col-md3">


    
    {:hook('home_right_extra')}

                      
      {include file="common/right"}

   
    {if miniapp() neq true}<div class="layui-card">
        <div class="layui-card-body">
          <fieldset class="layui-elem-field layui-field-title">
  			<legend><i class="fas fa-link"></i> 友情链接</legend>
		</fieldset>
          {volist name=":load_links()" id="item"}
            <a href="{$item.url}" target="_blank" title="{$item.name}" style="margin-right: 10px;{if $item.color}color: {$item.color};{/if}">{$item.name}</a>
          {/volist}
        </div>
    </div>
      {/if}
 


    
    {:hook('home_right_bottom_extra')}
    
    </div>
  </div>

</div>

{include file="common/footer"}
<script>
;!function(){
  var $ = layui.$
  	,carousel = layui.carousel
  	,laytpl = layui.laytpl
  	,flow = layui.flow;
  
    //图片轮播
    carousel.render({
      elem: '#test-carousel-img'
      ,width: '100%'
      ,height: '280px'
      ,interval: 5000
    });

    flow.load({
      elem: '#article-list'
      ,isAuto: false
      ,isLazyimg: true
      ,done: function(page, next){ //加载下一页
        if(page>1){
        	var lis = [];
	        $.get('{:url('wendasns/article/load')}',{page:page,limit:10},function(html){
	        	next(html, page < {$article->lastPage()});
	        });
        }else{
        	next('', page < {$article->lastPage()});
        }
      }
    });
    
}();
</script>
{:hook('home_bottom_extra')}
</body>
</html>